package com.taobao.askwho.ao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

import com.taobao.askwho.db.impl.UrlInfoDao;
import com.taobao.askwho.po.UrlInfo;

public class UrlAo {
	public UrlAo(){}
	private static final UrlAo urlAo = new UrlAo();
	private UrlInfoDao urlInfoDao = new UrlInfoDao();
	Logger logger = Logger.getLogger(UrlAo.class);

	public static UrlAo get() {
		return urlAo;
	}

	public List<UrlInfo> getRecentlyUrl(int limit, int size) {
		return urlInfoDao.getRecentlyUrl(0, 10);
	}
	
	public Map<String, UrlInfo> getUrlListByUuidList(List<String> uuidList) {
		return urlInfoDao.getUrlListByUuidList(uuidList);
	}

	public void addUrlInfo(UrlInfo info) throws SQLException {
		urlInfoDao.addUrlInfo(info);
	}
	
	public void deleteUrlInfo(String uuid) throws SQLException {
		urlInfoDao.deleteUrlInfo(uuid);
	}

}
